﻿using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BeadDesigner
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private bool saveRequired = false;
        public MainWindow()
        {
            InitializeComponent();

            Loaded += MainWindow_Loaded;

        }

        protected override void OnClosed(EventArgs e)
        {
            if (!saveRequired || PromptToSave())
            {
                base.OnClosed(e);
            }
        }

        /// <summary>
        /// Prompts the user to save all unsaved progress.
        /// </summary>
        /// <returns>True if the project was saved, false otherwise</returns>
        private bool PromptToSave()
        {
            return true;
        }

        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void NewClick(object sender, RoutedEventArgs e)
        {

        }

        private void OpenClick(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();
            if (dialog.ShowDialog() == true)
            {
            }

        }

        private void SaveClick(object sender, RoutedEventArgs e)
        {

        }

        private void SaveAsClick(object sender, RoutedEventArgs e)
        {

        }

        private void ExitClick(object sender, RoutedEventArgs e)
        {
            Close();
        }


    }
}
